package com.may.rabbitmq.consumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author May
 * @date 2021/03/30 11:48
 */
@Component
@RabbitListener(queues = "testDirectQueue")
public class DirectReceiver {

    @RabbitHandler
    public void process (Map<String, Object> msg) {
        System.out.println("消费者接收到消息: " + msg.toString());
    }
}
